<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
// console.log('--------------------------------------------');
// eval('console.log("hello world")');
// let msg = 'hello,eval';
// eval("console.log(msg)")
// eval("function show(){console.log(msg)}");
// show();
// //当解释器发现 eval()调用时，会将参数解释为实际的 ECMAScript 语句，然后将其插入到该位置
// eval('var str = "hello,str"'); //let,const声明的变量无法被提升
// console.log(str);
console.log('--------------------------------------------');
var color = 'red';
function zw(){
    console.log(window.color);
}
window.zw();
let global = function(){
    return this;
}();
console.log(global);
</script>
</html>